﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenESSOConfigurator.BusinessLayer.Atoms;

namespace OpenESSOConfigurator.PresentationLayer.PresentationModels
{
    public class PasswordPolicyPresentationModel : PresentationModel
    {
        private static PasswordPolicyPresentationModel instance;
        private PasswordPolicy _passwordPolicy;

        private PasswordPolicyPresentationModel()
        {
            eventBroker = new OpenESSOConfigurator.PresentationLayer.EventBroker.EventBroker();
            views = new List<IView>();
        }

        public static PasswordPolicyPresentationModel Instance
        {
            get 
            {
                if (instance == null) instance = new PasswordPolicyPresentationModel();
                return instance;
            }
        }

        public PasswordPolicy PasswordPolicy
        {
            set 
            {
                _passwordPolicy = value;
                this.UpdateViews();
            }
            get { return _passwordPolicy; }
        }
    }
}
